package com.zxl.live.screen.ui.activity;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;

import com.zxl.live.screen.R;
import com.zxl.live.screen.call.ui.receiver.CallReceiver;
import com.zxl.live.tools.base.BaseAppCompatActivity;
import com.zxl.live.tools.common.ApplicationHelper;
import com.zxl.live.tools.tools.AppUtils;

/**
 * Created by Administrator on 2017/11/23.
 */

public class AboutActivity extends BaseAppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        toolbar.setNavigationOnClickListener(this);
        TextView textView = (TextView) findViewById(R.id.version_name);
        if (ApplicationHelper.DEBUG) {
            textView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    CallReceiver.sendCall();
                }
            });
        }
        textView.setText("Version：" + AppUtils.getVersionNameByPkgName(this, getPackageName()));
    }

    @Override
    public void onClick(View v) {
        onBackPressed();
    }
}
